/**
 * @file tuya_ble_cfg.h
 * @brief Configuration settings for Tuya BLE SDK.
 * 
 * This file contains macro definitions and settings required for the
 * configuration of the Tuya BLE SDK to ensure proper operation with
 * different platforms and BLE specifications.
 * 
 * These settings include versioning, device roles, advertising parameters,
 * connection parameters, GATT settings, and memory allocation settings among others.
 * Adjustments to these settings should be made with an understanding of the
 * underlying BLE hardware capabilities and the requirements of the application.
 * 
 * @copyright Copyright (c) 2021-2024 Tuya Inc. All Rights Reserved.
 * 
 */
#ifndef _TUYA_BLE_CFG_H_
#define _TUYA_BLE_CFG_H_

#include "tuya_iot_config.h"

// for platform config
#define RTK_BT_PLATFORM   1 
#define ESWIN_BT_PLATFORM 2
#define BK_BT_PLATFORM    3

//tuya bk 2.3.1 version
#define  TUYA_BK_HOST_ALLACATION     0

#ifndef TY_HS_BLE_VERSION
#define TY_HS_BLE_VERSION (50)
#endif

#ifndef TY_HS_BLE_PUBLIC_DEV_ADDR
#define TY_HS_BLE_PUBLIC_DEV_ADDR ((uint8_t[6]){0x21, 0x18, 0x00, 0x00, 0x23, 0xBC})
#endif

#ifndef TY_HS_BLE_HCI_VS
#define TY_HS_BLE_HCI_VS (1)
#endif

#if TUYA_BK_HOST_ALLACATION
#ifndef TY_HS_BLE_ATT_PREFERRED_MTU
#define TY_HS_BLE_ATT_PREFERRED_MTU (23)
#endif
#else
#ifndef TY_HS_BLE_ATT_PREFERRED_MTU
#define TY_HS_BLE_ATT_PREFERRED_MTU (256)
#endif
#endif

#ifndef TY_HS_BLE_EXT_ADV
#define TY_HS_BLE_EXT_ADV (0)
#endif

#ifndef TY_HS_BLE_EXT_ADV_MAX_SIZE
#define TY_HS_BLE_EXT_ADV_MAX_SIZE (31)
#endif

#ifndef TY_HS_BLE_MAX_CONNECTIONS
#define TY_HS_BLE_MAX_CONNECTIONS (1)
#endif

#ifndef TY_HS_BLE_MAX_PERIODIC_SYNCS
#define TY_HS_BLE_MAX_PERIODIC_SYNCS (0)
#endif

#ifndef TY_HS_BLE_MULTI_ADV_INSTANCES
#define TY_HS_BLE_MULTI_ADV_INSTANCES (0)
#endif

#ifndef TY_HS_BLE_PERIODIC_ADV
#define TY_HS_BLE_PERIODIC_ADV (0)
#endif

#ifndef TY_HS_BLE_PERIODIC_ADV_SYNC_TRANSFER
#define TY_HS_BLE_PERIODIC_ADV_SYNC_TRANSFER (0)
#endif

#ifndef TY_HS_BLE_ROLE_BROADCASTER
#define TY_HS_BLE_ROLE_BROADCASTER (0)
#endif

#ifndef TY_HS_BLE_ROLE_CENTRAL
#define TY_HS_BLE_ROLE_CENTRAL (0)
#endif

#ifndef TY_HS_BLE_ROLE_OBSERVER
#define TY_HS_BLE_ROLE_OBSERVER (1)
#endif

#ifndef TY_HS_BLE_ROLE_PERIPHERAL
#define TY_HS_BLE_ROLE_PERIPHERAL (1)
#endif

#ifndef TY_HS_BLE_CONTROLLER
#define TY_HS_BLE_CONTROLLER (0)
#endif

#ifndef TY_HS_BLE_DEVICE
#define TY_HS_BLE_DEVICE (1)
#endif


#ifndef TY_HS_MSYS_1_BLOCK_COUNT
#define TY_HS_MSYS_1_BLOCK_COUNT 1000
#endif

#if TUYA_BK_HOST_ALLACATION
#ifndef TY_HS_MSYS_1_BLOCK_SIZE
#define TY_HS_MSYS_1_BLOCK_SIZE 80
#endif
#else
#ifndef TY_HS_MSYS_1_BLOCK_SIZE
#define TY_HS_MSYS_1_BLOCK_SIZE (292)
#endif
#endif

#ifndef TY_HS_MSYS_1_SANITY_MIN_COUNT
#define TY_HS_MSYS_1_SANITY_MIN_COUNT (0)
#endif

#ifndef TY_HS_MSYS_SANITY_TIMEOUT
#define TY_HS_MSYS_SANITY_TIMEOUT (60000)
#endif

#ifndef TY_HS_OS_MEMPOOL_CHECK
#define TY_HS_OS_MEMPOOL_CHECK (0)
#endif

#ifndef TY_HS_OS_MEMPOOL_GUARD
#define TY_HS_OS_MEMPOOL_GUARD (0)
#endif

#ifndef TY_HS_OS_MEMPOOL_POISON
#define TY_HS_OS_MEMPOOL_POISON (0)
#endif

#ifndef TY_HS_OS_SYSVIEW
#define TY_HS_OS_SYSVIEW (0)
#endif

#ifndef TY_HS_OS_SCHEDULING
#define TY_HS_OS_SCHEDULING (1)
#endif

#ifndef TY_HS_OS_SYSINIT_STAGE
#define TY_HS_OS_SYSINIT_STAGE (0)
#endif

#ifndef TY_HS_OS_SYSVIEW_TRACE_CALLOUT
#define TY_HS_OS_SYSVIEW_TRACE_CALLOUT (1)
#endif

#ifndef TY_HS_OS_SYSVIEW_TRACE_EVENTQ
#define TY_HS_OS_SYSVIEW_TRACE_EVENTQ (1)
#endif

#ifndef TY_HS_OS_SYSVIEW_TRACE_MBUF
#define TY_HS_OS_SYSVIEW_TRACE_MBUF (0)
#endif

#ifndef TY_HS_OS_SYSVIEW_TRACE_MEMPOOL
#define TY_HS_OS_SYSVIEW_TRACE_MEMPOOL (0)
#endif

#ifndef TY_HS_OS_SYSVIEW_TRACE_MUTEX
#define TY_HS_OS_SYSVIEW_TRACE_MUTEX (1)
#endif

#ifndef TY_HS_OS_SYSVIEW_TRACE_SEM
#define TY_HS_OS_SYSVIEW_TRACE_SEM (1)
#endif

#ifndef TY_HS_OS_TASK_RUN_TIME_CPUTIME
#define TY_HS_OS_TASK_RUN_TIME_CPUTIME (0)
#endif

#ifndef TY_HS_BLE_ISO
#define TY_HS_BLE_ISO (0)
#endif

#ifndef TY_HS_BLE_ISO_TEST
#define TY_HS_BLE_ISO_TEST (0)
#endif

#ifndef TY_HS_BLE_WHITELIST
#define TY_HS_BLE_WHITELIST (0)
#endif

#ifndef TY_HS_BLE_LP_CLOCK
#define TY_HS_BLE_LP_CLOCK (1)
#endif

#ifndef TY_HS_BLE_NUM_COMP_PKT_RATE
#define TY_HS_BLE_NUM_COMP_PKT_RATE ((2 * OS_TICKS_PER_SEC))
#endif



#ifndef TY_HS_BLE_ATT_SVR_FIND_INFO
#define TY_HS_BLE_ATT_SVR_FIND_INFO (1)
#endif

#ifndef TY_HS_BLE_ATT_SVR_FIND_TYPE
#define TY_HS_BLE_ATT_SVR_FIND_TYPE (1)
#endif

#ifndef TY_HS_BLE_ATT_SVR_INDICATE
#define TY_HS_BLE_ATT_SVR_INDICATE (1)
#endif

#if TUYA_BK_HOST_ALLACATION
#ifndef TY_HS_BLE_ATT_SVR_MAX_PREP_ENTRIES
#define TY_HS_BLE_ATT_SVR_MAX_PREP_ENTRIES (16)
#endif
#else
#ifndef TY_HS_BLE_ATT_SVR_MAX_PREP_ENTRIES
#define TY_HS_BLE_ATT_SVR_MAX_PREP_ENTRIES (64)
#endif
#endif

#ifndef TY_HS_BLE_ATT_SVR_NOTIFY
#define TY_HS_BLE_ATT_SVR_NOTIFY (1)
#endif

#ifndef TY_HS_BLE_ATT_SVR_QUEUED_WRITE
#define TY_HS_BLE_ATT_SVR_QUEUED_WRITE (1)
#endif

#ifndef TY_HS_BLE_ATT_SVR_QUEUED_WRITE_TMO
#define TY_HS_BLE_ATT_SVR_QUEUED_WRITE_TMO (30000)
#endif

#ifndef TY_HS_BLE_ATT_SVR_READ
#define TY_HS_BLE_ATT_SVR_READ (1)
#endif

#ifndef TY_HS_BLE_ATT_SVR_READ_BLOB
#define TY_HS_BLE_ATT_SVR_READ_BLOB (1)
#endif

#ifndef TY_HS_BLE_ATT_SVR_READ_GROUP_TYPE
#define TY_HS_BLE_ATT_SVR_READ_GROUP_TYPE (1)
#endif

#ifndef TY_HS_BLE_ATT_SVR_READ_MULT
#define TY_HS_BLE_ATT_SVR_READ_MULT (1)
#endif

#ifndef TY_HS_BLE_ATT_SVR_READ_TYPE
#define TY_HS_BLE_ATT_SVR_READ_TYPE (1)
#endif

#ifndef TY_HS_BLE_ATT_SVR_SIGNED_WRITE
#define TY_HS_BLE_ATT_SVR_SIGNED_WRITE (1)
#endif

#ifndef TY_HS_BLE_ATT_SVR_WRITE
#define TY_HS_BLE_ATT_SVR_WRITE (1)
#endif

#ifndef TY_HS_BLE_ATT_SVR_WRITE_NO_RSP
#define TY_HS_BLE_ATT_SVR_WRITE_NO_RSP (1)
#endif

#ifndef TY_HS_BLE_GAP_MAX_PENDING_CONN_PARAM_UPDATE
#define TY_HS_BLE_GAP_MAX_PENDING_CONN_PARAM_UPDATE (1)
#endif

#ifndef TY_HS_BLE_GATT_DISC_ALL_CHRS
#define TY_HS_BLE_GATT_DISC_ALL_CHRS (TY_HS_BLE_ROLE_CENTRAL)
#endif

#ifndef TY_HS_BLE_GATT_DISC_ALL_DSCS
#define TY_HS_BLE_GATT_DISC_ALL_DSCS (TY_HS_BLE_ROLE_CENTRAL)
#endif

#ifndef TY_HS_BLE_GATT_DISC_ALL_SVCS
#define TY_HS_BLE_GATT_DISC_ALL_SVCS (TY_HS_BLE_ROLE_CENTRAL)
#endif

#ifndef TY_HS_BLE_GATT_DISC_CHR_UUID
#define TY_HS_BLE_GATT_DISC_CHR_UUID (TY_HS_BLE_ROLE_CENTRAL)
#endif

#ifndef TY_HS_BLE_GATT_DISC_SVC_UUID
#define TY_HS_BLE_GATT_DISC_SVC_UUID (TY_HS_BLE_ROLE_CENTRAL)
#endif

#ifndef TY_HS_BLE_GATT_FIND_INC_SVCS
#define TY_HS_BLE_GATT_FIND_INC_SVCS (TY_HS_BLE_ROLE_CENTRAL)
#endif

#ifndef TY_HS_BLE_GATT_INDICATE
#define TY_HS_BLE_GATT_INDICATE (1)
#endif

#ifndef TY_HS_BLE_GATT_MAX_PROCS
#define TY_HS_BLE_GATT_MAX_PROCS (4)
#endif

#ifndef TY_HS_BLE_GATT_NOTIFY
#define TY_HS_BLE_GATT_NOTIFY (1)
#endif

#ifndef TY_HS_BLE_GATT_READ
#define TY_HS_BLE_GATT_READ (TY_HS_BLE_ROLE_CENTRAL)
#endif

#ifndef TY_HS_BLE_GATT_READ_LONG
#define TY_HS_BLE_GATT_READ_LONG (TY_HS_BLE_ROLE_CENTRAL)
#endif

#ifndef TY_HS_BLE_GATT_READ_MAX_ATTRS
#define TY_HS_BLE_GATT_READ_MAX_ATTRS (8)
#endif

#ifndef TY_HS_BLE_GATT_READ_MULT
#define TY_HS_BLE_GATT_READ_MULT (TY_HS_BLE_ROLE_CENTRAL)
#endif

#ifndef TY_HS_BLE_GATT_READ_UUID
#define TY_HS_BLE_GATT_READ_UUID (TY_HS_BLE_ROLE_CENTRAL)
#endif

#ifndef TY_HS_BLE_GATT_RESUME_RATE
#define TY_HS_BLE_GATT_RESUME_RATE (1000)
#endif

#ifndef TY_HS_BLE_GATT_SIGNED_WRITE
#define TY_HS_BLE_GATT_SIGNED_WRITE (TY_HS_BLE_ROLE_CENTRAL)
#endif

#ifndef TY_HS_BLE_GATT_WRITE
#define TY_HS_BLE_GATT_WRITE (TY_HS_BLE_ROLE_CENTRAL)
#endif

#ifndef TY_HS_BLE_GATT_WRITE_LONG
#define TY_HS_BLE_GATT_WRITE_LONG (TY_HS_BLE_ROLE_CENTRAL)
#endif

#ifndef TY_HS_BLE_GATT_WRITE_MAX_ATTRS
#define TY_HS_BLE_GATT_WRITE_MAX_ATTRS (4)
#endif

#ifndef TY_HS_BLE_GATT_WRITE_NO_RSP
#define TY_HS_BLE_GATT_WRITE_NO_RSP (TY_HS_BLE_ROLE_CENTRAL)
#endif

#ifndef TY_HS_BLE_GATT_WRITE_RELIABLE
#define TY_HS_BLE_GATT_WRITE_RELIABLE (TY_HS_BLE_ROLE_CENTRAL)
#endif

#ifndef TY_HS_BLE_HOST
#define TY_HS_BLE_HOST (1)
#endif

#ifndef TY_HS_BLE_HS_AUTO_START
#define TY_HS_BLE_HS_AUTO_START (0)
#endif

#ifndef TY_HS_BLE_HS_DEBUG
#define TY_HS_BLE_HS_DEBUG (0)
#endif
// WHEN TUYA_USE_DYNA_RAM = 1 AND TUYA_DYNA_ALLOCATION_LIMIT = 1,TY_HS_BLE_HS_FLOW_CTRL IS USE,
#ifndef TY_HS_BLE_HS_FLOW_CTRL
#define TY_HS_BLE_HS_FLOW_CTRL (0)
#endif

#ifndef TY_HS_BLE_HS_FLOW_CTRL_ITVL
#define TY_HS_BLE_HS_FLOW_CTRL_ITVL (1000)
#endif

#ifndef TY_HS_BLE_HS_FLOW_CTRL_THRESH
#define TY_HS_BLE_HS_FLOW_CTRL_THRESH (2)
#endif

#ifndef TY_HS_BLE_HS_FLOW_CTRL_TX_ON_DISCONNECT
#define TY_HS_BLE_HS_FLOW_CTRL_TX_ON_DISCONNECT (0)
#endif

#ifndef TY_HS_BLE_HS_PHONY_HCI_ACKS
#define TY_HS_BLE_HS_PHONY_HCI_ACKS (0)
#endif

#ifndef TY_HS_BLE_HS_REQUIRE_OS
#define TY_HS_BLE_HS_REQUIRE_OS (1)
#endif

#ifndef TY_HS_BLE_HS_STOP_ON_SHUTDOWN
#define TY_HS_BLE_HS_STOP_ON_SHUTDOWN (1)
#endif

#ifndef TY_HS_BLE_HS_STOP_ON_SHUTDOWN_TIMEOUT
#define TY_HS_BLE_HS_STOP_ON_SHUTDOWN_TIMEOUT (5000)
#endif

#ifndef TY_HS_BLE_HS_SYSINIT_STAGE
#define TY_HS_BLE_HS_SYSINIT_STAGE (200)
#endif

#ifndef TY_HS_BLE_L2CAP_COC_MAX_NUM
#define TY_HS_BLE_L2CAP_COC_MAX_NUM (0)
#endif

#ifndef TY_HS_BLE_L2CAP_COC_MPS
#define TY_HS_BLE_L2CAP_COC_MPS (TY_HS_MSYS_1_BLOCK_SIZE-8)
#endif

#ifndef TY_HS_BLE_L2CAP_ENHANCED_COC
#define TY_HS_BLE_L2CAP_ENHANCED_COC (0)
#endif

#ifndef TY_HS_BLE_L2CAP_JOIN_RX_FRAGS
#define TY_HS_BLE_L2CAP_JOIN_RX_FRAGS (1)
#endif

#ifndef TY_HS_BLE_L2CAP_MAX_CHANS
#define TY_HS_BLE_L2CAP_MAX_CHANS (3*TY_HS_BLE_MAX_CONNECTIONS)
#endif

#ifndef TY_HS_BLE_L2CAP_RX_FRAG_TIMEOUT
#define TY_HS_BLE_L2CAP_RX_FRAG_TIMEOUT (30000)
#endif

#ifndef TY_HS_BLE_L2CAP_SIG_MAX_PROCS
#define TY_HS_BLE_L2CAP_SIG_MAX_PROCS (1)
#endif

#ifndef TY_HS_BLE_MESH
#define TY_HS_BLE_MESH (0)
#endif

#ifndef TY_HS_BLE_MONITOR_CONSOLE_BUFFER_SIZE
#define TY_HS_BLE_MONITOR_CONSOLE_BUFFER_SIZE (128)
#endif

#ifndef TY_HS_BLE_MONITOR_RTT
#define TY_HS_BLE_MONITOR_RTT (0)
#endif

#ifndef TY_HS_BLE_MONITOR_RTT_BUFFERED
#define TY_HS_BLE_MONITOR_RTT_BUFFERED (1)
#endif

#ifndef TY_HS_BLE_MONITOR_RTT_BUFFER_NAME
#define TY_HS_BLE_MONITOR_RTT_BUFFER_NAME ("btmonitor")
#endif

#ifndef TY_HS_BLE_MONITOR_RTT_BUFFER_SIZE
#define TY_HS_BLE_MONITOR_RTT_BUFFER_SIZE (256)
#endif

#ifndef TY_HS_BLE_MONITOR_UART
#define TY_HS_BLE_MONITOR_UART (0)
#endif

#ifndef TY_HS_BLE_MONITOR_UART_BAUDRATE
#define TY_HS_BLE_MONITOR_UART_BAUDRATE (1000000)
#endif

#ifndef TY_HS_BLE_MONITOR_UART_BUFFER_SIZE
#define TY_HS_BLE_MONITOR_UART_BUFFER_SIZE (64)
#endif

#ifndef TY_HS_BLE_MONITOR_UART_DEV
#define TY_HS_BLE_MONITOR_UART_DEV ("uart0")
#endif

#ifndef TY_HS_BLE_RPA_TIMEOUT
#define TY_HS_BLE_RPA_TIMEOUT (300)
#endif

#ifndef TY_HS_BLE_SM_BONDING
#define TY_HS_BLE_SM_BONDING (0)
#endif

#ifndef TY_HS_BLE_SM_IO_CAP
#define TY_HS_BLE_SM_IO_CAP (BLE_HS_IO_NO_INPUT_OUTPUT)
#endif

#ifndef TY_HS_BLE_SM_KEYPRESS
#define TY_HS_BLE_SM_KEYPRESS (0)
#endif

#ifndef TY_HS_BLE_SM_LEGACY
#define TY_HS_BLE_SM_LEGACY (0)
#endif

#ifndef TY_HS_BLE_SM_MAX_PROCS
#define TY_HS_BLE_SM_MAX_PROCS (1)
#endif

#ifndef TY_HS_BLE_SM_MITM
#define TY_HS_BLE_SM_MITM (0)
#endif

#ifndef TY_HS_BLE_SM_OOB_DATA_FLAG
#define TY_HS_BLE_SM_OOB_DATA_FLAG (0)
#endif

#ifndef TY_HS_BLE_SM_OUR_KEY_DIST
#define TY_HS_BLE_SM_OUR_KEY_DIST (0)
#endif

#ifndef TY_HS_BLE_SM_SC
#define TY_HS_BLE_SM_SC (0)  // if using mesh, we need to open sc
#endif

#ifndef TY_HS_BLE_SM_SC_DEBUG_KEYS
#define TY_HS_BLE_SM_SC_DEBUG_KEYS (0)
#endif

#ifndef TY_HS_BLE_SM_THEIR_KEY_DIST
#define TY_HS_BLE_SM_THEIR_KEY_DIST (0)
#endif

#ifndef TY_HS_BLE_STORE_MAX_BONDS
#define TY_HS_BLE_STORE_MAX_BONDS (3)
#endif

#ifndef TY_HS_BLE_STORE_MAX_CCCDS
#define TY_HS_BLE_STORE_MAX_CCCDS (8)
#endif

#ifndef TY_HS_BLE_SVC_GAP_APPEARANCE
#define TY_HS_BLE_SVC_GAP_APPEARANCE (0)
#endif

#ifndef TY_HS_BLE_SVC_GAP_APPEARANCE_WRITE_PERM
#define TY_HS_BLE_SVC_GAP_APPEARANCE_WRITE_PERM (-1)
#endif

#ifndef TY_HS_BLE_SVC_GAP_CENTRAL_ADDRESS_RESOLUTION
#define TY_HS_BLE_SVC_GAP_CENTRAL_ADDRESS_RESOLUTION (-1)
#endif

#ifndef TY_HS_BLE_SVC_GAP_DEVICE_NAME
#define TY_HS_BLE_SVC_GAP_DEVICE_NAME ("TY_HS_STACK")
#endif

#ifndef TY_HS_BLE_SVC_GAP_DEVICE_NAME_MAX_LENGTH
#define TY_HS_BLE_SVC_GAP_DEVICE_NAME_MAX_LENGTH (31)
#endif

#ifndef TY_HS_BLE_SVC_GAP_DEVICE_NAME_WRITE_PERM
#define TY_HS_BLE_SVC_GAP_DEVICE_NAME_WRITE_PERM (-1)
#endif

#ifndef TY_HS_BLE_SVC_GAP_PPCP_MAX_CONN_INTERVAL
#define TY_HS_BLE_SVC_GAP_PPCP_MAX_CONN_INTERVAL (0)
#endif

#ifndef TY_HS_BLE_SVC_GAP_PPCP_MIN_CONN_INTERVAL
#define TY_HS_BLE_SVC_GAP_PPCP_MIN_CONN_INTERVAL (0)
#endif

#ifndef TY_HS_BLE_SVC_GAP_PPCP_SLAVE_LATENCY
#define TY_HS_BLE_SVC_GAP_PPCP_SLAVE_LATENCY (0)
#endif

#ifndef TY_HS_BLE_SVC_GAP_PPCP_SUPERVISION_TMO
#define TY_HS_BLE_SVC_GAP_PPCP_SUPERVISION_TMO (0)
#endif

#ifndef TY_HS_BLE_SVC_GAP_SYSINIT_STAGE
#define TY_HS_BLE_SVC_GAP_SYSINIT_STAGE (301)
#endif

#ifndef TY_HS_BLE_SVC_GATT_SYSINIT_STAGE
#define TY_HS_BLE_SVC_GATT_SYSINIT_STAGE (302)
#endif

#ifndef TY_HS_BLE_TRANS_RAM_SYSINIT_STAGE
#define TY_HS_BLE_TRANS_RAM_SYSINIT_STAGE (100)
#endif

#ifndef TY_HS_BLE_MESH_ACCESS_LOG_LVL
#define TY_HS_BLE_MESH_ACCESS_LOG_LVL (1)
#endif

#ifndef TY_HS_BLE_MESH_ACCESS_LOG_MOD
#define TY_HS_BLE_MESH_ACCESS_LOG_MOD (10)
#endif

#ifndef TY_HS_BLE_MESH_ADV_BUF_COUNT
#define TY_HS_BLE_MESH_ADV_BUF_COUNT (20)
#endif

#ifndef TY_HS_BLE_MESH_ADV_LOG_LVL
#define TY_HS_BLE_MESH_ADV_LOG_LVL (1)
#endif

#ifndef TY_HS_BLE_MESH_ADV_LOG_MOD
#define TY_HS_BLE_MESH_ADV_LOG_MOD (11)
#endif

#ifndef TY_HS_BLE_MESH_ADV_TASK_PRIO
#define TY_HS_BLE_MESH_ADV_TASK_PRIO (9)
#endif

#ifndef TY_HS_BLE_MESH_APP_KEY_COUNT
#define TY_HS_BLE_MESH_APP_KEY_COUNT (4)
#endif

#ifndef TY_HS_BLE_MESH_BEACON_LOG_LVL
#define TY_HS_BLE_MESH_BEACON_LOG_LVL (1)
#endif

#ifndef TY_HS_BLE_MESH_BEACON_LOG_MOD
#define TY_HS_BLE_MESH_BEACON_LOG_MOD (12)
#endif

#ifndef TY_HS_BLE_MESH_CFG_CLI
#define TY_HS_BLE_MESH_CFG_CLI (1)
#endif

#ifndef TY_HS_BLE_MESH_CRPL
#define TY_HS_BLE_MESH_CRPL (10)
#endif

#ifndef TY_HS_BLE_MESH_CRYPTO_LOG_LVL
#define TY_HS_BLE_MESH_CRYPTO_LOG_LVL (1)
#endif

#ifndef TY_HS_BLE_MESH_CRYPTO_LOG_MOD
#define TY_HS_BLE_MESH_CRYPTO_LOG_MOD (13)
#endif

#ifndef TY_HS_BLE_MESH_DEVICE_NAME
#define TY_HS_BLE_MESH_DEVICE_NAME ("tuya-mesh-node")
#endif

#ifndef TY_HS_BLE_MESH_DEV_UUID
#define TY_HS_BLE_MESH_DEV_UUID (((uint8_t[16]){0x11, 0x22, 0}))
#endif

#ifndef TY_HS_BLE_MESH_FRIEND
#define TY_HS_BLE_MESH_FRIEND (1)
#endif

#ifndef TY_HS_BLE_MESH_FRIEND_LOG_LVL
#define TY_HS_BLE_MESH_FRIEND_LOG_LVL (1)
#endif

#ifndef TY_HS_BLE_MESH_FRIEND_LOG_MOD
#define TY_HS_BLE_MESH_FRIEND_LOG_MOD (14)
#endif

#ifndef TY_HS_BLE_MESH_FRIEND_LPN_COUNT
#define TY_HS_BLE_MESH_FRIEND_LPN_COUNT (2)
#endif

#ifndef TY_HS_BLE_MESH_FRIEND_QUEUE_SIZE
#define TY_HS_BLE_MESH_FRIEND_QUEUE_SIZE (16)
#endif

#ifndef TY_HS_BLE_MESH_FRIEND_RECV_WIN
#define TY_HS_BLE_MESH_FRIEND_RECV_WIN (255)
#endif

#ifndef TY_HS_BLE_MESH_FRIEND_SEG_RX
#define TY_HS_BLE_MESH_FRIEND_SEG_RX (1)
#endif

#ifndef TY_HS_BLE_MESH_FRIEND_SUB_LIST_SIZE
#define TY_HS_BLE_MESH_FRIEND_SUB_LIST_SIZE (3)
#endif

#ifndef TY_HS_BLE_MESH_GATT_PROXY
#define TY_HS_BLE_MESH_GATT_PROXY (1)
#endif

#ifndef TY_HS_BLE_MESH_HEALTH_CLI
#define TY_HS_BLE_MESH_HEALTH_CLI (0)
#endif

#ifndef TY_HS_BLE_MESH_IVU_DIVIDER
#define TY_HS_BLE_MESH_IVU_DIVIDER (4)
#endif

#ifndef TY_HS_BLE_MESH_IV_UPDATE_TEST
#define TY_HS_BLE_MESH_IV_UPDATE_TEST (1)
#endif

#ifndef TY_HS_BLE_MESH_LABEL_COUNT
#define TY_HS_BLE_MESH_LABEL_COUNT (2)
#endif

#ifndef TY_HS_BLE_MESH_LOG_LVL
#define TY_HS_BLE_MESH_LOG_LVL (1)
#endif

#ifndef TY_HS_BLE_MESH_LOG_MOD
#define TY_HS_BLE_MESH_LOG_MOD (9)
#endif

#ifndef TY_HS_BLE_MESH_LOW_POWER
#define TY_HS_BLE_MESH_LOW_POWER (1)
#endif

#ifndef TY_HS_BLE_MESH_LOW_POWER_LOG_LVL
#define TY_HS_BLE_MESH_LOW_POWER_LOG_LVL (1)
#endif

#ifndef TY_HS_BLE_MESH_LOW_POWER_LOG_MOD
#define TY_HS_BLE_MESH_LOW_POWER_LOG_MOD (15)
#endif

#ifndef TY_HS_BLE_MESH_LPN_AUTO
#define TY_HS_BLE_MESH_LPN_AUTO (0)
#endif

#ifndef TY_HS_BLE_MESH_LPN_AUTO_TIMEOUT
#define TY_HS_BLE_MESH_LPN_AUTO_TIMEOUT (15)
#endif

#ifndef TY_HS_BLE_MESH_LPN_ESTABLISHMENT
#define TY_HS_BLE_MESH_LPN_ESTABLISHMENT (1)
#endif

#ifndef TY_HS_BLE_MESH_LPN_GROUPS
#define TY_HS_BLE_MESH_LPN_GROUPS (10)
#endif

#ifndef TY_HS_BLE_MESH_LPN_SUB_ALL_NODES_ADDR
#define TY_HS_BLE_MESH_LPN_SUB_ALL_NODES_ADDR (1)
#endif

#ifndef TY_HS_BLE_MESH_LPN_INIT_POLL_TIMEOUT
#define TY_HS_BLE_MESH_LPN_INIT_POLL_TIMEOUT (TY_HS_BLE_MESH_LPN_POLL_TIMEOUT)
#endif

#ifndef TY_HS_BLE_MESH_LPN_MIN_QUEUE_SIZE
#define TY_HS_BLE_MESH_LPN_MIN_QUEUE_SIZE (1)
#endif

#ifndef TY_HS_BLE_MESH_LPN_POLL_TIMEOUT
#define TY_HS_BLE_MESH_LPN_POLL_TIMEOUT (300)
#endif

#ifndef TY_HS_BLE_MESH_LPN_RECV_DELAY
#define TY_HS_BLE_MESH_LPN_RECV_DELAY (100)
#endif

#ifndef TY_HS_BLE_MESH_LPN_RECV_WIN_FACTOR
#define TY_HS_BLE_MESH_LPN_RECV_WIN_FACTOR (0)
#endif

#ifndef TY_HS_BLE_MESH_LPN_RETRY_TIMEOUT
#define TY_HS_BLE_MESH_LPN_RETRY_TIMEOUT (8)
#endif

#ifndef TY_HS_BLE_MESH_LPN_RSSI_FACTOR
#define TY_HS_BLE_MESH_LPN_RSSI_FACTOR (0)
#endif

#ifndef TY_HS_BLE_MESH_LPN_SCAN_LATENCY
#define TY_HS_BLE_MESH_LPN_SCAN_LATENCY (10)
#endif

#ifndef TY_HS_BLE_MESH_MODEL_EXTENSIONS
#define TY_HS_BLE_MESH_MODEL_EXTENSIONS (0)
#endif

#ifndef TY_HS_BLE_MESH_MODEL_GROUP_COUNT
#define TY_HS_BLE_MESH_MODEL_GROUP_COUNT (2)
#endif

#ifndef TY_HS_BLE_MESH_MODEL_KEY_COUNT
#define TY_HS_BLE_MESH_MODEL_KEY_COUNT (1)
#endif

#ifndef TY_HS_BLE_MESH_MODEL_LOG_LVL
#define TY_HS_BLE_MESH_MODEL_LOG_LVL (1)
#endif

#ifndef TY_HS_BLE_MESH_MODEL_LOG_MOD
#define TY_HS_BLE_MESH_MODEL_LOG_MOD (16)
#endif

#ifndef TY_HS_BLE_MESH_MSG_CACHE_SIZE
#define TY_HS_BLE_MESH_MSG_CACHE_SIZE (10)
#endif

#ifndef TY_HS_BLE_MESH_NET_LOG_LVL
#define TY_HS_BLE_MESH_NET_LOG_LVL (1)
#endif

#ifndef TY_HS_BLE_MESH_NET_LOG_MOD
#define TY_HS_BLE_MESH_NET_LOG_MOD (17)
#endif

#ifndef TY_HS_BLE_MESH_NODE_COUNT
#define TY_HS_BLE_MESH_NODE_COUNT (1)
#endif

#ifndef TY_HS_BLE_MESH_NODE_ID_TIMEOUT
#define TY_HS_BLE_MESH_NODE_ID_TIMEOUT (60)
#endif

#ifndef TY_HS_BLE_MESH_OOB_INPUT_ACTIONS
#define TY_HS_BLE_MESH_OOB_INPUT_ACTIONS (((BT_MESH_NO_INPUT)))
#endif

#ifndef TY_HS_BLE_MESH_OOB_INPUT_SIZE
#define TY_HS_BLE_MESH_OOB_INPUT_SIZE (4)
#endif

#ifndef TY_HS_BLE_MESH_OOB_OUTPUT_ACTIONS
#define TY_HS_BLE_MESH_OOB_OUTPUT_ACTIONS (((BT_MESH_DISPLAY_NUMBER)))
#endif

#ifndef TY_HS_BLE_MESH_OOB_OUTPUT_SIZE
#define TY_HS_BLE_MESH_OOB_OUTPUT_SIZE (4)
#endif

#ifndef TY_HS_BLE_MESH_PB_ADV
#define TY_HS_BLE_MESH_PB_ADV (1)
#endif

#ifndef TY_HS_BLE_MESH_PB_GATT
#define TY_HS_BLE_MESH_PB_GATT (1)
#endif

#ifndef TY_HS_BLE_MESH_PROV
#define TY_HS_BLE_MESH_PROV (1)
#endif

#ifndef TY_HS_BLE_MESH_PROVISIONER
#define TY_HS_BLE_MESH_PROVISIONER (0)
#endif

#ifndef TY_HS_BLE_MESH_CDB
#define TY_HS_BLE_MESH_CDB (0)
#endif

#ifndef TY_HS_BLE_MESH_CDB_SUBNET_COUNT
#define TY_HS_BLE_MESH_CDB_SUBNET_COUNT (1)
#endif

#ifndef TY_HS_BLE_MESH_CDB_NODE_COUNT
#define TY_HS_BLE_MESH_CDB_NODE_COUNT (1)
#endif

#ifndef TY_HS_BLE_MESH_CDB_APP_KEY_COUNT
#define TY_HS_BLE_MESH_CDB_APP_KEY_COUNT (1)
#endif

#ifndef TY_HS_BLE_MESH_PROV_LOG_LVL
#define TY_HS_BLE_MESH_PROV_LOG_LVL (4)
#endif

#ifndef TY_HS_BLE_MESH_PROV_LOG_MOD
#define TY_HS_BLE_MESH_PROV_LOG_MOD (18)
#endif

#ifndef TY_HS_BLE_MESH_PROXY
#define TY_HS_BLE_MESH_PROXY (1)
#endif

#ifndef TY_HS_BLE_MESH_PROXY_FILTER_SIZE
#define TY_HS_BLE_MESH_PROXY_FILTER_SIZE (1)
#endif

#ifndef TY_HS_BLE_MESH_PROXY_LOG_LVL
#define TY_HS_BLE_MESH_PROXY_LOG_LVL (1)
#endif

#ifndef TY_HS_BLE_MESH_PROXY_LOG_MOD
#define TY_HS_BLE_MESH_PROXY_LOG_MOD (19)
#endif

#ifndef TY_HS_BLE_MESH_RELAY
#define TY_HS_BLE_MESH_RELAY (1)
#endif

#ifndef TY_HS_BLE_MESH_RPL_STORE_TIMEOUT
#define TY_HS_BLE_MESH_RPL_STORE_TIMEOUT (5)
#endif

#ifndef TY_HS_BLE_MESH_SEG_BUFS
#define TY_HS_BLE_MESH_SEG_BUFS (72)
#endif

#ifndef TY_HS_BLE_MESH_RX_SEG_MAX
#define TY_HS_BLE_MESH_RX_SEG_MAX (3)
#endif

#ifndef TY_HS_BLE_MESH_RX_SEG_MSG_COUNT
#define TY_HS_BLE_MESH_RX_SEG_MSG_COUNT (2)
#endif

#ifndef TY_HS_BLE_MESH_SEG_RETRANSMIT_ATTEMPTS
#define TY_HS_BLE_MESH_SEG_RETRANSMIT_ATTEMPTS (4)
#endif

#ifndef TY_HS_BLE_MESH_SEQ_STORE_RATE
#define TY_HS_BLE_MESH_SEQ_STORE_RATE (128)
#endif

#ifndef TY_HS_BLE_MESH_SETTINGS
#define TY_HS_BLE_MESH_SETTINGS (0)
#endif

#ifndef TY_HS_BLE_MESH_SETTINGS_LOG_LVL
#define TY_HS_BLE_MESH_SETTINGS_LOG_LVL (1)
#endif

#ifndef TY_HS_BLE_MESH_SETTINGS_LOG_MOD
#define TY_HS_BLE_MESH_SETTINGS_LOG_MOD (20)
#endif

#ifndef TY_HS_BLE_MESH_SHELL
#define TY_HS_BLE_MESH_SHELL (0)
#endif

#ifndef TY_HS_BLE_MESH_SHELL_MODELS
#define TY_HS_BLE_MESH_SHELL_MODELS (0)
#endif

#ifndef TY_HS_BLE_MESH_STORE_TIMEOUT
#define TY_HS_BLE_MESH_STORE_TIMEOUT (2)
#endif

#ifndef TY_HS_BLE_MESH_SUBNET_COUNT
#define TY_HS_BLE_MESH_SUBNET_COUNT (2)
#endif

#ifndef TY_HS_BLE_MESH_SYSINIT_STAGE
#define TY_HS_BLE_MESH_SYSINIT_STAGE (500)
#endif

#ifndef TY_HS_BLE_MESH_SYSINIT_STAGE_SHELL
#define TY_HS_BLE_MESH_SYSINIT_STAGE_SHELL (1000)
#endif

#ifndef TY_HS_BLE_MESH_TESTING
#define TY_HS_BLE_MESH_TESTING (1)
#endif

#ifndef TY_HS_BLE_MESH_TRANS_LOG_LVL
#define TY_HS_BLE_MESH_TRANS_LOG_LVL (1)
#endif

#ifndef TY_HS_BLE_MESH_TRANS_LOG_MOD
#define TY_HS_BLE_MESH_TRANS_LOG_MOD (21)
#endif

#ifndef TY_HS_BLE_MESH_RPL_LOG_LVL
#define TY_HS_BLE_MESH_RPL_LOG_LVL (1)
#endif

#ifndef TY_HS_BLE_MESH_RPL_LOG_MOD
#define TY_HS_BLE_MESH_RPL_LOG_MOD (22)
#endif

#ifndef TY_HS_BLE_MESH_TX_SEG_MAX
#define TY_HS_BLE_MESH_TX_SEG_MAX (6)
#endif

#ifndef TY_HS_BLE_MESH_RX_SEG_MSG_COUNT
#define TY_HS_BLE_MESH_RX_SEG_MSG_COUNT (3)
#endif

#ifndef TY_HS_BLE_MESH_UNPROV_BEACON_INT
#define TY_HS_BLE_MESH_UNPROV_BEACON_INT (5)
#endif

#ifndef TY_HS_BLE_MESH_PB_ADV_RETRANS_TIMEOUT
#define TY_HS_BLE_MESH_PB_ADV_RETRANS_TIMEOUT (500)
#endif

#ifndef TY_HS_BLE_MESH_TX_SEG_MSG_COUNT
#define TY_HS_BLE_MESH_TX_SEG_MSG_COUNT (4)
#endif

#ifndef TY_HS_BLE_MESH_TX_SEG_RETRANS_COUNT
#define TY_HS_BLE_MESH_TX_SEG_RETRANS_COUNT (4)
#endif

#ifndef TY_HS_BLE_MESH_TX_SEG_RETRANS_TIMEOUT_UNICAST
#define TY_HS_BLE_MESH_TX_SEG_RETRANS_TIMEOUT_UNICAST (400)
#endif

#ifndef TY_HS_BLE_MESH_TX_SEG_RETRANS_TIMEOUT_GROUP
#define TY_HS_BLE_MESH_TX_SEG_RETRANS_TIMEOUT_GROUP (50)
#endif

#ifndef TY_HS_BLE_MESH_LOOPBACK_BUFS
#define TY_HS_BLE_MESH_LOOPBACK_BUFS (3)
#endif

#ifndef TY_HS_BLE_MESH_DEFAULT_TTL
#define TY_HS_BLE_MESH_DEFAULT_TTL (7)
#endif

#ifndef TY_HS_BLE_MESH_NETWORK_TRANSMIT_COUNT
#define TY_HS_BLE_MESH_NETWORK_TRANSMIT_COUNT (2)
#endif

#ifndef TY_HS_BLE_MESH_NETWORK_TRANSMIT_INTERVAL
#define TY_HS_BLE_MESH_NETWORK_TRANSMIT_INTERVAL (20)
#endif

#ifndef TY_HS_BLE_MESH_RELAY_RETRANSMIT_COUNT
#define TY_HS_BLE_MESH_RELAY_RETRANSMIT_COUNT (2)
#endif

#ifndef TY_HS_BLE_MESH_BEACON_ENABLED
#define TY_HS_BLE_MESH_BEACON_ENABLED (1)
#endif

#ifndef TY_HS_BLE_MESH_GATT_PROXY_ENABLED
#define TY_HS_BLE_MESH_GATT_PROXY_ENABLED (1)
#endif

#ifndef TY_HS_BLE_MESH_FRIEND_ENABLED
#define TY_HS_BLE_MESH_FRIEND_ENABLED (1)
#endif

#ifndef TY_HS_BLE_MESH_RELAY_ENABLED
#define TY_HS_BLE_MESH_RELAY_ENABLED (1)
#endif

#ifndef TY_HS_BLE_MESH_RELAY_RETRANSMIT_INTERVAL
#define TY_HS_BLE_MESH_RELAY_RETRANSMIT_INTERVAL (20)
#endif

#ifndef TUYA_HS_BLE_HOST_TASK_PRIORITY
#define TUYA_HS_BLE_HOST_TASK_PRIORITY (9)
#endif

#endif
